package com.mercury.pattern._17_mediator;

public class Client {
    public static void main(String[] args) {
        Mediator mediator = new ConcreateMediator();
        Person houseOwner = new HouseOwner(mediator,"房东");
        Person renters = new Renters(mediator,"租客");

        mediator.addPerson(HouseOwner.class,houseOwner);
        mediator.addPerson(Renters.class,renters);

        houseOwner.contact("我有房子要出租",houseOwner);
        renters.contact("是吗？",renters);
    }
}
